a,b=input().split()
a=int(a)
b=int(b)
sum=0
flag=1
for i in range(a,b+1):
    sum+=i;
    if flag<5 and i!=b:
        print("%5d"%i,end='')
        flag+=1
    else:
        print("%5d"%i)
        flag=1
print("Sum = %d"%(sum))